<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>付款成功页面</title>
    <link rel="stylesheet" type="text/css" href="/AmazeUI-2.4.2/assets/css/amazeui.css"/>
    <link href="/AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css">
    <link href="/basic/css/demo.css" rel="stylesheet" type="text/css"/>
    <link type="text/css" href="/css/hmstyle.css" rel="stylesheet"/>
    <link href="/css/sustyle.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="/basic/js/jquery-1.7.min.js"></script>
    <script type="text/javascript" src="/layui/layui.js"></script>
    <script src="/js/common.js" type="text/javascript"></script>
</head>

<body>


<th:block th:include="header"/>

<div class="clear"></div>


<div class="take-delivery">
    <div class="status">
        <h2>订单提交成功！请您付款</h2>
        <div class="successInfo">
            <ul>
                <li>付款金额<em>￥[[${payment.price}]]</em></li>
                <div class="user-info">
                    <p>请您在 15 分 0 秒 内完成支付，超时将自动取消</p>
                </div>
                <div class="user-info">
                 <img th:src="${'https://api.qrserver.com/v1/create-qr-code/?data='+qrCode}"/>
                </div>
                如有问题请联系客服

            </ul>
            <div class="option">
                <span class="info">您可以</span>
                <a href="/order" class="J_MakePoint">查看<span>订单列表</span></a>
            </div>
        </div>
    </div>
</div>
<th:block th:include="footer"/>
<script src="/layui/layui.js"></script>
<script>
    layui.use(["layer"],function (){
        var $ = layui.jquery;
        var date1 = local.date
        var d =new Date(date1);
        //订单生成时间往后15分钟
        d.setMinutes(d.getMinutes() + 15);

        var f = function (){
            var now = new Date();
            var seconds = parseInt(((d.getTime() - now.getTime() /1000).toFixed()));
            var m = Math.floor(seconds / 60);
            var s = seconds - 60 * m;
            $(".time").html(' ' + m + ' 分 ' + s + "  秒 ");

            $.get("/order/status?id="+[[${param.id}]],function (status){
                if(status === "1"){
                    location.href="/order";
                }
            });
        }
        setInterval(f,1000);

    })


</script>
</body>
</html>
